#成绩统计
n = int(input('输入人数:'))
result = []
countD = 0
countC = 0
count = 0
if n<0:
    print("ERROR")
else:
    for i in range(n):
        sorce = int(input('输入第{}位学生的成绩：'.format(i+1)))
        if sorce < 0 or sorce >100:
            break
        else:
            result.append(sorce)
            count += 1
            if sorce >= 60:
                countC += 1
            else:
                countD += 1

    print('输入的原始成绩为:')
    for j in result:
        print(j)
    print('\n有效成绩人数为', count)
    print('\n及格人数为', countC)
    print('\n不及格人数为', countD)